home *** CD-ROM | disk | FTP | other *** search
/ Software USA 4 #11 / Software USA Volume 4.11.iso / mac / Educational / mac06 / usr / include / tar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-28  |  1.4 KB  |  70 lines  |  [TEXT/SPM ]

  1. /* mac06©1997,1998 by HNS/DSITRI hns@computer.org
  2. ** tar.h
  3. ** Tape ARchive record format
  4. */
  5.  
  6. #pragma once
  7.  
  8. #define BLKLEN    512
  9.  
  10. #define TMAGIC        "ustar"
  11. #define TMAGLEN        6
  12. #define TVERSION    "00"
  13. #define TVERLEN        2
  14.  
  15. typedef union tarblk
  16.     {
  17.     struct header
  18.         {
  19.         char name[100];            /* entry name */
  20.         char mode[8];            /* octal string */
  21.         char uid[8];            /* octal string */
  22.         char gid[8];            /* octal string */
  23.         char size[12];            /* octal string */
  24.         char mtime[12];            /* octal string */
  25.         char cksum[8];            /* octal string */
  26.         char type;                /* file type */
  27.         char linkname[100];        /* linked to ... */
  28.         char fill[2];
  29.         char magic[TMAGLEN];    /* magic string */
  30.         char uname[32];            /* full user name */
  31.         char gname[32];            /* full group name */
  32.         char devmajor[8];
  33.         char devminor[8];
  34.         } h;
  35.     unsigned char data[BLKLEN];
  36.     } TARBLK;
  37.  
  38. #define TARHSZ sizeof(TARBLK)
  39.  
  40. #define NAMELEN        100
  41.  
  42. /* file types */
  43.  
  44. #define REGTYPE        0        /* regular file */
  45. #define AREGTYPE    '0'        /* regular file */
  46. #define LNKTYPE        '1'        /* link */
  47. #define SYMTYPE        '2'        /* symbolic link */
  48. #define CHRTYPE        '3'        /* character device */
  49. #define BLKTYPE        '4'        /* block device */
  50. #define DIRTYPE        '5'        /* directory */
  51. #define FIFOTYPE    '6'        /* FIFO file */
  52. #define CONTTYPE            /*    */
  53.  
  54. /* mode definitions */
  55.  
  56. #define TSUID
  57. #define TSGID
  58. #define TSVTX
  59. #define TUREAD
  60. #define TUWRITE
  61. #define TUEXEC
  62. #define TGREAD
  63. #define TGWRITE
  64. #define TGEXEC
  65. #define TOREAD
  66. #define TOWRITE
  67. #define TOEXEC
  68.  
  69.     
  70. /* EOF */